3.1334 \(\int \frac {A+B x}{a+c x^2} \, dx\)

Optimal. Leaf size=42 \[ \frac {A \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {c}}+\frac {B \log \left (a+c x^2\right )}{2 c} \]

[Out]

1/2*B*ln(c*x^2+a)/c+A*arctan(x*c^(1/2)/a^(1/2))/a^(1/2)/c^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {635, 205, 260} \[ \frac {A \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {c}}+\frac {B \log \left (a+c x^2\right )}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(a + c*x^2),x]

[Out]

(A*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[c]) + (B*Log[a + c*x^2])/(2*c)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rubi steps

\begin {align*} \int \frac {A+B x}{a+c x^2} \, dx &=A \int \frac {1}{a+c x^2} \, dx+B \int \frac {x}{a+c x^2} \, dx\\ &=\frac {A \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {c}}+\frac {B \log \left (a+c x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 42, normalized size = 1.00 \[ \frac {A \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {c}}+\frac {B \log \left (a+c x^2\right )}{2 c} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(a + c*x^2),x]

[Out]

(A*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[c]) + (B*Log[a + c*x^2])/(2*c)

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 98, normalized size = 2.33 \[ \left [\frac {B a \log \left (c x^{2} + a\right ) - \sqrt {-a c} A \log \left (\frac {c x^{2} - 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right )}{2 \, a c}, \frac {B a \log \left (c x^{2} + a\right ) + 2 \, \sqrt {a c} A \arctan \left (\frac {\sqrt {a c} x}{a}\right )}{2 \, a c}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(B*a*log(c*x^2 + a) - sqrt(-a*c)*A*log((c*x^2 - 2*sqrt(-a*c)*x - a)/(c*x^2 + a)))/(a*c), 1/2*(B*a*log(c*x
^2 + a) + 2*sqrt(a*c)*A*arctan(sqrt(a*c)*x/a))/(a*c)]

________________________________________________________________________________________

giac [A]  time = 0.15, size = 31, normalized size = 0.74 \[ \frac {A \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}} + \frac {B \log \left (c x^{2} + a\right )}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a),x, algorithm="giac")

[Out]

A*arctan(c*x/sqrt(a*c))/sqrt(a*c) + 1/2*B*log(c*x^2 + a)/c

________________________________________________________________________________________

maple [A]  time = 0.06, size = 32, normalized size = 0.76 \[ \frac {A \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}+\frac {B \ln \left (c \,x^{2}+a \right )}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(c*x^2+a),x)

[Out]

1/2*B*ln(c*x^2+a)/c+A/(a*c)^(1/2)*arctan(1/(a*c)^(1/2)*c*x)

________________________________________________________________________________________

maxima [A]  time = 1.16, size = 31, normalized size = 0.74 \[ \frac {A \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}} + \frac {B \log \left (c x^{2} + a\right )}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a),x, algorithm="maxima")

[Out]

A*arctan(c*x/sqrt(a*c))/sqrt(a*c) + 1/2*B*log(c*x^2 + a)/c

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 32, normalized size = 0.76 \[ \frac {B\,\ln \left (c\,x^2+a\right )}{2\,c}+\frac {A\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(a + c*x^2),x)

[Out]

(B*log(a + c*x^2))/(2*c) + (A*atan((c^(1/2)*x)/a^(1/2)))/(a^(1/2)*c^(1/2))

________________________________________________________________________________________

sympy [B]  time = 0.26, size = 124, normalized size = 2.95 \[ \left (- \frac {A \sqrt {- a c^{3}}}{2 a c^{2}} + \frac {B}{2 c}\right ) \log {\left (x + \frac {- B a + 2 a c \left (- \frac {A \sqrt {- a c^{3}}}{2 a c^{2}} + \frac {B}{2 c}\right )}{A c} \right )} + \left (\frac {A \sqrt {- a c^{3}}}{2 a c^{2}} + \frac {B}{2 c}\right ) \log {\left (x + \frac {- B a + 2 a c \left (\frac {A \sqrt {- a c^{3}}}{2 a c^{2}} + \frac {B}{2 c}\right )}{A c} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x**2+a),x)

[Out]

(-A*sqrt(-a*c**3)/(2*a*c**2) + B/(2*c))*log(x + (-B*a + 2*a*c*(-A*sqrt(-a*c**3)/(2*a*c**2) + B/(2*c)))/(A*c))
+ (A*sqrt(-a*c**3)/(2*a*c**2) + B/(2*c))*log(x + (-B*a + 2*a*c*(A*sqrt(-a*c**3)/(2*a*c**2) + B/(2*c)))/(A*c))

________________________________________________________________________________________